
package com.audi.user.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.annotations.GenericGenerator;


@Entity
@Table(name = "tbl_audi_user")
public class AudiUser implements java.io.Serializable{
    
	private static final long serialVersionUID = 5454155825314635342L;
	
	
    /**
     * userId       db_column: user_id 
     */ 	
	
	private Long userId;
    /**
     * loginName       db_column: login_name 
     */ 	
	//@Length(max=64)
	private java.lang.String loginName;
    /**
     * password       db_column: password 
     */ 	
	//@Length(max=32)
	private java.lang.String password;
    /**
     * mobile       db_column: mobile 
     */ 	
	//@Length(max=11)
	private java.lang.String mobile;
    /**
     * email       db_column: email 
     */ 	
	//@Email @Length(max=64)
	private java.lang.String email;
    /**
     * passwordinfo       db_column: passwordinfo 
     */ 	
	
	private Long passwordinfo;
    /**
     * nickName       db_column: nick_name 
     */ 	
	//@Length(max=64)
	private java.lang.String nickName;
    /**
     * realName       db_column: real_name 
     */ 	
	//@Length(max=64)
	private java.lang.String realName;
    /**
     * avatar       db_column: avatar 
     */ 	
	//@Length(max=128)
	private java.lang.String avatar;
    /**
     * status       db_column: status 
     */ 	
	
	private Long status;
    /**
     * type       db_column: type 
     */ 	
	
	private Long type;
    /**
     * domain       db_column: domain 
     */ 	
	//@Length(max=64)
	private java.lang.String domain;
    /**
     * friendNum       db_column: friend_num 
     */ 	
	
	private Long friendNum;
    /**
     * followerNum       db_column: follower_num 
     */ 	
	
	private Long followerNum;
    /**
     * followingNum       db_column: following_num 
     */ 	
	
	private Long followingNum;
    /**
     * theme       db_column: theme 
     */ 	
	//@Length(max=128)
	private java.lang.String theme;
    /**
     * userOnline       db_column: user_online 
     */ 	
	
	private Long userOnline;
    /**
     * lastLoginIp       db_column: last_login_ip 
     */ 	
	//@Length(max=128)
	private java.lang.String lastLoginIp;
    /**
     * lastLoginTime       db_column: last_login_time 
     */ 	
	
	private java.util.Date lastLoginTime;
    /**
     * userTag       db_column: user_tag 
     */ 	
	//@Length(max=256)
	private java.lang.String userTag;
    /**
     * activityCount       db_column: activity_count 
     */ 	
	
	private Long activityCount;
    /**
     * joinCount       db_column: join_count 
     */ 	
	
	private Long joinCount;
    /**
     * age       db_column: age 
     */ 	
	
	private Long age;
    /**
     * province       db_column: province 
     */ 	
	//@Length(max=64)
	private java.lang.Long provinceId;
    /**
     * cityId       db_column: city_id 
     */ 	
	
	private Long cityId;
    
    /**
     * constellation       db_column: constellation 
     */ 	
	//@Length(max=32)
	private java.lang.String constellation;
    /**
     * signature       db_column: signature 
     */ 	
	//@Length(max=128)
	private java.lang.String signature;
    /**
     * gender       db_column: gender 
     */ 	
	
	private Long gender;
    /**
     * topicNum       db_column: topic_num 
     */ 	
	
	private Long topicNum;
    /**
     * albumNum       db_column: album_num 
     */ 	
	
	private Long albumNum;
    /**
     * collectNum       db_column: collect_num 
     */ 	
	
	private Long collectNum;
    /**
     * commentNum       db_column: comment_num 
     */ 	
	
	private Long commentNum;
    /**
     * scoreNum       db_column: score_num 
     */ 	
	
	private Long scoreNum;
    /**
     * vblogNum       db_column: vblog_num 
     */ 	
	
	private Long vblogNum;
    /**
     * groupNum       db_column: group_num 
     */ 	
	
	private Long groupNum;
    /**
     * activityNum       db_column: activity_num 
     */ 	
	
	private Long activityNum;
    /**
     * createIp       db_column: create_ip 
     */ 	
	//@Length(max=128)
	private java.lang.String createIp;
    /**
     * modifyTime       db_column: modify_time 
     */ 	
	
	private java.util.Date modifyTime;
    /**
     * createTime       db_column: create_time 
     */ 	
	
	private java.util.Date createTime;
	//columns END


	public AudiUser(){
	}

	public AudiUser(
		Long userId
	){
		this.userId = userId;
	}

	

	public void setUserId(Long value) {
		this.userId = value;
	}
	
	@Id
	//@SequenceGenerator(name="audi_user_SEQ",sequenceName="seq_audi_user")
   // @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="audi_user_SEQ") 
	@GenericGenerator(name="custom-id", strategy = "identity")
    @GeneratedValue(generator="custom-id")
	@Column(name = "user_id")
	public Long getUserId() {
		return this.userId;
	}
	
	@Column(name = "login_name",length=64)
	public java.lang.String getLoginName() {
		return this.loginName;
	}
	
	public void setLoginName(java.lang.String value) {
		this.loginName = value;
	}
	
	@Column(name = "password",length=32)
	public java.lang.String getPassword() {
		return this.password;
	}
	
	public void setPassword(java.lang.String value) {
		this.password = value;
	}
	
	@Column(name = "mobile",length=11)
	public java.lang.String getMobile() {
		return this.mobile;
	}
	
	public void setMobile(java.lang.String value) {
		this.mobile = value;
	}
	
	@Column(name = "email",length=64)
	public java.lang.String getEmail() {
		return this.email;
	}
	
	public void setEmail(java.lang.String value) {
		this.email = value;
	}
	
	@Column(name = "passwordinfo")
	public Long getPasswordinfo() {
		return this.passwordinfo;
	}
	
	public void setPasswordinfo(Long value) {
		this.passwordinfo = value;
	}
	
	@Column(name = "nick_name",length=64)
	public java.lang.String getNickName() {
		return this.nickName;
	}
	
	public void setNickName(java.lang.String value) {
		this.nickName = value;
	}
	
	@Column(name = "real_name",length=64)
	public java.lang.String getRealName() {
		return this.realName;
	}
	
	public void setRealName(java.lang.String value) {
		this.realName = value;
	}
	
	@Column(name = "avatar",length=128)
	public java.lang.String getAvatar() {
		return this.avatar;
	}
	
	public void setAvatar(java.lang.String value) {
		this.avatar = value;
	}
	
	@Column(name = "status")
	public Long getStatus() {
		return this.status;
	}
	
	public void setStatus(Long value) {
		this.status = value;
	}
	
	@Column(name = "type")
	public Long getType() {
		return this.type;
	}
	
	public void setType(Long value) {
		this.type = value;
	}
	
	@Column(name = "domain",length=64)
	public java.lang.String getDomain() {
		return this.domain;
	}
	
	public void setDomain(java.lang.String value) {
		this.domain = value;
	}
	
	@Column(name = "friend_num")
	public Long getFriendNum() {
		return this.friendNum;
	}
	
	public void setFriendNum(Long value) {
		this.friendNum = value;
	}
	
	@Column(name = "follower_num")
	public Long getFollowerNum() {
		return this.followerNum;
	}
	
	public void setFollowerNum(Long value) {
		this.followerNum = value;
	}
	
	@Column(name = "following_num")
	public Long getFollowingNum() {
		return this.followingNum;
	}
	
	public void setFollowingNum(Long value) {
		this.followingNum = value;
	}
	
	@Column(name = "theme",length=128)
	public java.lang.String getTheme() {
		return this.theme;
	}
	
	public void setTheme(java.lang.String value) {
		this.theme = value;
	}
	
	@Column(name = "user_online")
	public Long getUserOnline() {
		return this.userOnline;
	}
	
	public void setUserOnline(Long value) {
		this.userOnline = value;
	}
	
	@Column(name = "last_login_ip",length=128)
	public java.lang.String getLastLoginIp() {
		return this.lastLoginIp;
	}
	
	public void setLastLoginIp(java.lang.String value) {
		this.lastLoginIp = value;
	}
	
	
	@Column(name = "last_login_time")
	public java.util.Date getLastLoginTime() {
		return this.lastLoginTime;
	}
	
	public void setLastLoginTime(java.util.Date value) {
		this.lastLoginTime = value;
	}
	
	@Column(name = "user_tag",length=256)
	public java.lang.String getUserTag() {
		return this.userTag;
	}
	
	public void setUserTag(java.lang.String value) {
		this.userTag = value;
	}
	
	@Column(name = "activity_count")
	public Long getActivityCount() {
		return this.activityCount;
	}
	
	public void setActivityCount(Long value) {
		this.activityCount = value;
	}
	
	@Column(name = "join_count")
	public Long getJoinCount() {
		return this.joinCount;
	}
	
	public void setJoinCount(Long value) {
		this.joinCount = value;
	}
	
	@Column(name = "age")
	public Long getAge() {
		return this.age;
	}
	
	public void setAge(Long value) {
		this.age = value;
	}
	
	
	
	@Column(name = "city_id")
	public Long getCityId() {
		return this.cityId;
	}
	
	public void setCityId(Long value) {
		this.cityId = value;
	}
	
	
	@Column(name = "constellation",length=32)
	public java.lang.String getConstellation() {
		return this.constellation;
	}
	
	public void setConstellation(java.lang.String value) {
		this.constellation = value;
	}
	
	@Column(name = "signature",length=512)
	public java.lang.String getSignature() {
		return this.signature;
	}
	
	public void setSignature(java.lang.String value) {
		this.signature = value;
	}
	
	@Column(name = "gender")
	public Long getGender() {
		return this.gender;
	}
	
	public void setGender(Long value) {
		this.gender = value;
	}
	
	@Column(name = "topic_num")
	public Long getTopicNum() {
		return this.topicNum;
	}
	
	public void setTopicNum(Long value) {
		this.topicNum = value;
	}
	
	@Column(name = "album_num")
	public Long getAlbumNum() {
		return this.albumNum;
	}
	
	public void setAlbumNum(Long value) {
		this.albumNum = value;
	}
	
	@Column(name = "collect_num")
	public Long getCollectNum() {
		return this.collectNum;
	}
	
	public void setCollectNum(Long value) {
		this.collectNum = value;
	}
	
	@Column(name = "comment_num")
	public Long getCommentNum() {
		return this.commentNum;
	}
	
	public void setCommentNum(Long value) {
		this.commentNum = value;
	}
	
	@Column(name = "score_num" )
	public Long getScoreNum() {
		return this.scoreNum;
	}
	
	public void setScoreNum(Long value) {
		this.scoreNum = value;
	}
	
	@Column(name = "vblog_num")
	public Long getVblogNum() {
		return this.vblogNum;
	}
	
	public void setVblogNum(Long value) {
		this.vblogNum = value;
	}
	
	@Column(name = "group_num")
	public Long getGroupNum() {
		return this.groupNum;
	}
	
	public void setGroupNum(Long value) {
		this.groupNum = value;
	}
	
	@Column(name = "activity_num")
	public Long getActivityNum() {
		return this.activityNum;
	}
	
	public void setActivityNum(Long value) {
		this.activityNum = value;
	}
	
	@Column(name = "create_ip",length=128)
	public java.lang.String getCreateIp() {
		return this.createIp;
	}
	
	public void setCreateIp(java.lang.String value) {
		this.createIp = value;
	}
	
	
	@Column(name = "modify_time")
	public java.util.Date getModifyTime() {
		return this.modifyTime;
	}
	
	public void setModifyTime(java.util.Date value) {
		this.modifyTime = value;
	}
	
	
	@Column(name = "create_time")
	public java.util.Date getCreateTime() {
		return this.createTime;
	}
	
	public void setCreateTime(java.util.Date value) {
		this.createTime = value;
	}
	

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("UserId",getUserId())
			.append("LoginName",getLoginName())
			.append("Password",getPassword())
			.append("Mobile",getMobile())
			.append("Email",getEmail())
			.append("Passwordinfo",getPasswordinfo())
			.append("NickName",getNickName())
			.append("RealName",getRealName())
			.append("Avatar",getAvatar())
			.append("Status",getStatus())
			.append("Type",getType())
			.append("Domain",getDomain())
			.append("FriendNum",getFriendNum())
			.append("FollowerNum",getFollowerNum())
			.append("FollowingNum",getFollowingNum())
			.append("Theme",getTheme())
			.append("UserOnline",getUserOnline())
			.append("LastLoginIp",getLastLoginIp())
			.append("LastLoginTime",getLastLoginTime())
			.append("UserTag",getUserTag())
			.append("ActivityCount",getActivityCount())
			.append("JoinCount",getJoinCount())
			.append("Age",getAge())
			.append("ProvinceId",getProvinceId())
			.append("CityId",getCityId())
			.append("Constellation",getConstellation())
			.append("Signature",getSignature())
			.append("Gender",getGender())
			.append("TopicNum",getTopicNum())
			.append("AlbumNum",getAlbumNum())
			.append("CollectNum",getCollectNum())
			.append("CommentNum",getCommentNum())
			.append("ScoreNum",getScoreNum())
			.append("VblogNum",getVblogNum())
			.append("GroupNum",getGroupNum())
			.append("ActivityNum",getActivityNum())
			.append("CreateIp",getCreateIp())
			.append("ModifyTime",getModifyTime())
			.append("CreateTime",getCreateTime())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getUserId())
			.toHashCode();
	}
	
	
	
	public java.lang.Long getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(java.lang.Long provinceId) {
        this.provinceId = provinceId;
    }

    public boolean equals(Object obj) {
		if(obj instanceof AudiUser == false) return false;
		if(this == obj) return true;
		AudiUser other = (AudiUser)obj;
		return new EqualsBuilder()
			.append(getUserId(),other.getUserId())
			.isEquals();
	}
}

